<script>
/*
 * @Author: wzh 
 * @Date: 2020-12-30 19:57:43 
 * @Last Modified by: 1521620993@qq.com
 * @Last Modified time: 2020-12-30 20:30:22
 */
</script>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>06-浮动元素的宽高</title>
</head>
<body>
  <style>
    div{
      height: 100px;
    }
    .item1{
      background-color: magenta;
      float: left;
      opacity: 0.9;
      height: auto;
    }
    .item2{
      background: repeating-linear-gradient(to bottom, blue 10%, red 20%, blue, red 30%);
    }
  </style>
  <div class="item1">Lorem, ipsum dolor.</div>
  <div class="item2"></div>
</body>
</html>